﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace outTest
{
    class Program
    {
        static void Main(string[] args)
        {
            int i;//= 5; 可以不用赋值
            Test(out i);
            Console.WriteLine(i);
            string s = "ab";
            if(int.TryParse(s,out i))
            {
                Console.WriteLine(i);
            }
            else
            {
                Console.WriteLine("转换失败！");
            }


           
            Console.ReadKey();
        }

        static void Test(out int i)
        {
            i = 6;
        }
    }
}
